package com.dzx.design.creational.builder;

/**
 * @author dzx
 * @ClassName:
 * @Description:  建造者模式
 * @date 2019年07月13日 17:02:12
 */
public class Coach {

    private CourseBuilder courseBuilder;

    public void setCourseBuilder(CourseBuilder courseBuilder) {
        this.courseBuilder = courseBuilder;
    }

    public Course makeCourse(String courseName, String coursePPT, String courseVideo, String article, String courseQA) {
        this.courseBuilder.buildCourseName(courseName);
        this.courseBuilder.buildCoursePPT(coursePPT);
        this.courseBuilder.buildCourseVideo(courseVideo);
        this.courseBuilder.buildCourseArticle(article);
        this.courseBuilder.buildCourseOA(courseQA);
        return this.courseBuilder.makeCourse();
    }


}
